home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / EPPC.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  4.5 KB  |  163 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        EPPC.a
  3. ;
  4. ;    Contains:    High Level Event Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1988-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__EPPC__') = 'UNDEFINED' THEN
  18. __EPPC__ SET 1
  19.  
  20.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  21.     include 'Errors.a'
  22.     ENDIF
  23.     IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
  24.     include 'AppleTalk.a'
  25.     ENDIF
  26.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  27.     include 'Files.a'
  28.     ENDIF
  29.     IF &TYPE('__PPCTOOLBOX__') = 'UNDEFINED' THEN
  30.     include 'PPCToolbox.a'
  31.     ENDIF
  32.     IF &TYPE('__PROCESSES__') = 'UNDEFINED' THEN
  33.     include 'Processes.a'
  34.     ENDIF
  35.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  36.     include 'Events.a'
  37.     ENDIF
  38.  
  39.  
  40.                                                             ; postOptions currently supported 
  41. receiverIDMask                    EQU        $0000F000
  42. receiverIDisPSN                    EQU        $00008000
  43. receiverIDisSignature            EQU        $00007000
  44. receiverIDisSessionID            EQU        $00006000
  45. receiverIDisTargetID            EQU        $00005000
  46. systemOptionsMask                EQU        $00000F00
  47. nReturnReceipt                    EQU        $00000200
  48. priorityMask                    EQU        $000000FF
  49. nAttnMsg                        EQU        $00000001
  50.  
  51.                                                             ; constant for return receipts 
  52. HighLevelEventMsgClass            EQU        'jaym'
  53. rtrnReceiptMsgID                EQU        'rtrn'
  54.  
  55. msgWasPartiallyAccepted            EQU        2
  56. msgWasFullyAccepted                EQU        1
  57. msgWasNotAccepted                EQU        0
  58. TargetID                RECORD 0
  59. sessionID                 ds.l    1                ; offset: $0 (0)
  60. name                     ds        PPCPortRec        ; offset: $4 (4)
  61. location                 ds        LocationNameRec ; offset: $4C (76)
  62. recvrName                 ds        PPCPortRec        ; offset: $B4 (180)
  63. sizeof                     EQU *                    ; size:   $FC (252)
  64.                         ENDR
  65. ; typedef struct TargetID *                TargetIDPtr
  66.  
  67. ; typedef TargetIDPtr *                    TargetIDHandle
  68.  
  69. ; typedef TargetIDHandle                 TargetIDHdl
  70.  
  71. SenderID                RECORD 0
  72. f                         ds        TargetID
  73. sizeof                     EQU *                    ; size:   $FC (252)
  74.                         ENDR
  75.  
  76.  
  77. ; typedef struct SenderID *                SenderIDPtr
  78.  
  79. HighLevelEventMsg        RECORD 0
  80. HighLevelEventMsgHeaderLength  ds.w 1            ; offset: $0 (0)
  81. version                     ds.w    1                ; offset: $2 (2)
  82. reserved1                 ds.l    1                ; offset: $4 (4)
  83. theMsgEvent                 ds        EventRecord        ; offset: $8 (8)
  84. userRefcon                 ds.l    1                ; offset: $18 (24)
  85. postingOptions             ds.l    1                ; offset: $1C (28)
  86. msgLength                 ds.l    1                ; offset: $20 (32)
  87. sizeof                     EQU *                    ; size:   $24 (36)
  88.                         ENDR
  89. ; typedef struct HighLevelEventMsg *    HighLevelEventMsgPtr
  90.  
  91. ; typedef HighLevelEventMsgPtr *        HighLevelEventMsgHandle
  92.  
  93. ; typedef HighLevelEventMsgHandle         HighLevelEventMsgHdl
  94.  
  95. ;
  96. ; pascal OSErr PostHighLevelEvent(const EventRecord *theEvent, void *receiverID, unsigned long msgRefcon, void *msgBuff, unsigned long msgLen, unsigned long postingOptions)
  97. ;
  98.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  99.         Macro
  100.         _PostHighLevelEvent
  101.             move.w              #$0034,-(sp)
  102.             dc.w                $A88F
  103.         EndM
  104.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  105.         IMPORT_CFM_FUNCTION PostHighLevelEvent
  106.     ENDIF
  107.  
  108. ;
  109. ; pascal OSErr AcceptHighLevelEvent(TargetID *sender, unsigned long *msgRefcon, void *msgBuff, unsigned long *msgLen)
  110. ;
  111.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  112.         Macro
  113.         _AcceptHighLevelEvent
  114.             move.w              #$0033,-(sp)
  115.             dc.w                $A88F
  116.         EndM
  117.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  118.         IMPORT_CFM_FUNCTION AcceptHighLevelEvent
  119.     ENDIF
  120.  
  121. ;
  122. ; pascal OSErr GetProcessSerialNumberFromPortName(const PPCPortRec *portName, ProcessSerialNumber *pPSN)
  123. ;
  124.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  125.         Macro
  126.         _GetProcessSerialNumberFromPortName
  127.             move.w              #$0035,-(sp)
  128.             dc.w                $A88F
  129.         EndM
  130.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  131.         IMPORT_CFM_FUNCTION GetProcessSerialNumberFromPortName
  132.     ENDIF
  133.  
  134. ;
  135. ; pascal OSErr GetPortNameFromProcessSerialNumber(PPCPortRec *portName, const ProcessSerialNumber *pPSN)
  136. ;
  137.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  138.         Macro
  139.         _GetPortNameFromProcessSerialNumber
  140.             move.w              #$0046,-(sp)
  141.             dc.w                $A88F
  142.         EndM
  143.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  144.         IMPORT_CFM_FUNCTION GetPortNameFromProcessSerialNumber
  145.     ENDIF
  146.  
  147. ;
  148. ; pascal Boolean GetSpecificHighLevelEvent(GetSpecificFilterUPP aFilter, void *contextPtr, OSErr *err)
  149. ;
  150.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  151.         Macro
  152.         _GetSpecificHighLevelEvent
  153.             move.w              #$0045,-(sp)
  154.             dc.w                $A88F
  155.         EndM
  156.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  157.         IMPORT_CFM_FUNCTION GetSpecificHighLevelEvent
  158.     ENDIF
  159.  
  160.  
  161.     ENDIF ; __EPPC__ 
  162.  
  163.